<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>01_BOM操作</title>
</head>
<body>
  <button onclick="alert('请先登录！')">弹出警告框</button>
  <button onclick="confirm('确定要删除吗？')">弹出确认框</button>
  <script>
    console.log(parseInt(6.1));//6
    console.log(parseInt(6.9));//6
    console.log(parseInt(6));//6
    console.log(parseInt('6.99'));//6
    console.log(parseInt('hhh'));//NaN

    console.log(parseFloat(6.1));//6.1
    console.log(parseFloat(6.9));//6.9
    console.log(parseFloat(6));//6
    console.log(parseFloat('6.99'));//6.99
    console.log(parseFloat('hhh'));//NaN

    console.log(isNaN(6));//false
    console.log(isNaN('6'));//false
    console.log(isNaN('hhh'));//true
    console.log(isNaN(NaN));//true
    console.log(isNaN(undefined));//true
    console.log(isNaN(null));//false
    console.log(isNaN(true));//false
    console.log(isNaN(false));//false
    console.log(isNaN(''));//false
  </script>
</body>
</html>
